The present invention generally relates to the field of information retrieval, and more specifically to the problem of automatically identifying compounds (such as bigrams or more generally n-grams) in search queries to facilitate generating better search results.